]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensions-tool: Add template metadata
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 8 Nov 2019 23:20:08 +0000 (00:20 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Tue, 7 Apr 2020 20:27:00 +0000 (20:27 +0000)
When we allow users to choose between different templates, we should
provide some context for each template to facilitate that choice.

Add that metadata in the form of a .desktop file, which allows us to
specify name and description, and is well supported by our translation
infrastructure.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

po/POTFILES.in
subprojects/extensions-tool/meson.build
subprojects/extensions-tool/src/gnome-extensions-tool.gresource.xml
subprojects/extensions-tool/src/meson.build
subprojects/extensions-tool/src/templates/00-plain.desktop.in [new file with mode: 0644]
subprojects/extensions-tool/src/templates/meson.build [new file with mode: 0644]

index 499d3a700a3b06835ee2568556fe96760cbaad75..765dbb72dc6ed39a66d85645f5a1f4239e2aecd5 100644 (file)
@@ -94,5 +94,6 @@ subprojects/extensions-tool/src/command-prefs.c
 subprojects/extensions-tool/src/command-reset.c
 subprojects/extensions-tool/src/command-uninstall.c
 subprojects/extensions-tool/src/main.c
+subprojects/extensions-tool/src/templates/00-plain.desktop.in
 # Please do not remove this file from POTFILES.in. Run "git submodule init && git submodule update" to get it.
 subprojects/gvc/gvc-mixer-control.c
index 0e95edd98beb659012b29e591be507d7da7e956b..0832bf08517f0e425e7c36892bfedd71af4c6c14 100644 (file)
@@ -35,6 +35,8 @@ cc = meson.get_compiler('c')
 
 bash_completion = dependency('bash-completion', required: get_option('bash_completion'))
 
+po_dir = meson.source_root() + '/po'
+
 subdir('src')
 
 if bash_completion.found()
index dce8d5c666088072176616528b646441b0de58ee..684358c136f9704987766559d40aeed7de0103c6 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gresources>
   <gresource prefix="/org/gnome/extensions-tool">
+    <file>templates/00-plain.desktop</file>
     <file>templates/plain/extension.js</file>
     <file>templates/plain/stylesheet.css</file>
   </gresource>
index 77d62b5e991161b223c4530b89d2b4e1fb7d1880..a855fef973498fa91e0e5f7458dc97e814ac3d7f 100644 (file)
@@ -22,9 +22,12 @@ sources = [
   'main.c'
 ]
 
+subdir('templates')
+
 resources = gnome.compile_resources('resources',
   'gnome-extensions-tool.gresource.xml',
-  source_dir: '.'
+  source_dir: ['.', meson.current_build_dir()],
+  dependencies: template_deps,
 )
 
 executable('gnome-extensions',
diff --git a/subprojects/extensions-tool/src/templates/00-plain.desktop.in b/subprojects/extensions-tool/src/templates/00-plain.desktop.in
new file mode 100644 (file)
index 0000000..36ddf80
--- /dev/null
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Type=Application
+Name=Plain
+Comment=An empty extension
+Path=plain
diff --git a/subprojects/extensions-tool/src/templates/meson.build b/subprojects/extensions-tool/src/templates/meson.build
new file mode 100644 (file)
index 0000000..4f86ad4
--- /dev/null
@@ -0,0 +1,12 @@
+template_metas = [
+  '00-plain.desktop',
+]
+template_deps = []
+foreach template : template_metas
+  template_deps += i18n.merge_file(template,
+    input: template + '.in',
+    output: template,
+    po_dir: po_dir,
+    type: 'desktop',
+  )
+endforeach